UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'A/0NlmgAH73y9nITIK/RhsFWIXsdmSdBn262oLhtAeo='
WHERE
key_id = '29060497fb26a673931589294c9f9bd520c05c5423c66235517da4db069c5aec'
AND (
token = 'A/0NlmgAH73y9nITIK/RhsFWIXsdmSdBn262oLhtAeo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)