UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'd02XcHVbh+h/3vdBeZUGZNJu7w7CKIefNQR4Kq/CfeE='
WHERE
key_id = '0f4b6b6139dd60ab5db70f72a0aea23404d1c928a2d852fde6cd59a2517a33b9'
AND (
token = 'd02XcHVbh+h/3vdBeZUGZNJu7w7CKIefNQR4Kq/CfeE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)