UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'eqvRBrY2S3sB3e+HstJTmi/fOL4tYyc3n1lkVbHLWhc='
WHERE
key_id = '056479fb55a4a7d2e4f288471d28d97a80eebaa9d27973ee7d733076af2b7873'
AND (
token = 'eqvRBrY2S3sB3e+HstJTmi/fOL4tYyc3n1lkVbHLWhc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)