UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/7/EhPmkUp4YeZ6RBEVvBBU0KJQw3I5g052A7qeZJwo='
WHERE
key_id = '93eee01598e12c437056fd37073b038e1149a6f3724a2537c926ff1563c2c621'
AND (
token = '/7/EhPmkUp4YeZ6RBEVvBBU0KJQw3I5g052A7qeZJwo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)