UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'mrLsPlxwbPc1yS/c5ZL7XoizGXdVXuTHb7Es7W7tlUQ='
WHERE
key_id = '67da736c3d9366b8db351654e10158792b601fdad67835a7935f81036f68b5d4'
AND (
token = 'mrLsPlxwbPc1yS/c5ZL7XoizGXdVXuTHb7Es7W7tlUQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)