UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'sD/Sj/INhwjse0otJwo18BKbdKKxQqS5OCRvu6D8r6c='
WHERE
key_id = '70008e00da90f594f67584daf979b60cd39c57757a80438025432f458205f96b'
AND (
token = 'sD/Sj/INhwjse0otJwo18BKbdKKxQqS5OCRvu6D8r6c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)