UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zMP9UbE3w2ACgcWCtYntGdHQukD73BpxlmvsIMYMZL0='
WHERE
key_id = '7455a12d0d680793cfd713791b936f0d5d97a1fb7f7c7930d3c733d792244704'
AND (
token = 'zMP9UbE3w2ACgcWCtYntGdHQukD73BpxlmvsIMYMZL0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)