UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jLQcRm2ZfRulLjDuGwUC0GBHMBfqrBb+Z8ZDZLfLM6s='
WHERE
key_id = '002d58ff7c6fd6d8a6a0985767812703c3479719b5c7995bde2022e70fe464b7'
AND (
token = 'jLQcRm2ZfRulLjDuGwUC0GBHMBfqrBb+Z8ZDZLfLM6s='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)