UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'fczoKk1Ue9Rrhk5iufJgp/xZqOwKJWejrczrtNCJQFU='
WHERE
key_id = '94bb824af4766bdf0cc661ada74728c03fa5d27f9802f3845bfe68f191e71a9a'
AND (
token = 'fczoKk1Ue9Rrhk5iufJgp/xZqOwKJWejrczrtNCJQFU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)