UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zo/2f7F6L2uamwo6jkL1hQkWm3jIudTjbO2JXCe05rU='
WHERE
key_id = '24053bfdbb07d196b771e35d53d1a55e5229a700cf7d6dc9225007d8697cafda'
AND (
token = 'zo/2f7F6L2uamwo6jkL1hQkWm3jIudTjbO2JXCe05rU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)