UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Z9RFD1xNiDEzS1lB1guDUBBwhEuWd0yRxfs04+UZ488='
WHERE
key_id = '956e72438d6079fe39b1b97293daa519c222d56452676f950c11667edbb8e20e'
AND (
token = 'Z9RFD1xNiDEzS1lB1guDUBBwhEuWd0yRxfs04+UZ488='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)