UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'YETKR4vr/WV+TMaaL56EfbSfIXeMXkugl95smsY6cFQ='
WHERE
key_id = '263c73140897a759607909c5be870e707b9a784a09fb9a7e7015f3fab50b8f23'
AND (
token = 'YETKR4vr/WV+TMaaL56EfbSfIXeMXkugl95smsY6cFQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)