UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '6TzIhCWVt+Q7jswQJYRfLV4ZVSQMgfK9V7XY2B5B3DQ='
WHERE
key_id = '0011760b1ab5f1b9a9f88d2eb966d81413e3ac25b5d19e978ebb82d5cc66e997'
AND (
token = '6TzIhCWVt+Q7jswQJYRfLV4ZVSQMgfK9V7XY2B5B3DQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)