UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'L7z+nzzJ5QP3a4rUEpY5V4X94p7+o9YEC4AH33HskxQ='
WHERE
key_id = '219659f76cc22b003d316f83c5d42b5351915d569a45da01f74de7d7d926fcc6'
AND (
token = 'L7z+nzzJ5QP3a4rUEpY5V4X94p7+o9YEC4AH33HskxQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)