UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '92Sf/r0o17UWUL8jMr/LxJpb0Ju3YKNZdjYqMiiwhI4='
WHERE
key_id = '92f1d314d83c9751896ee28f1602e243a1f450bc4ec26cb125014d635a408877'
AND (
token = '92Sf/r0o17UWUL8jMr/LxJpb0Ju3YKNZdjYqMiiwhI4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)