UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'J0HU9MGAzscl8LHXmlBJ/nVsU0APiC9cUWSD0uJ8V68='
WHERE
key_id = 'ede438f6fb483b2b59d7d0970b3d3d518acf714d39993e0c3e7810cc56869502'
AND (
token = 'J0HU9MGAzscl8LHXmlBJ/nVsU0APiC9cUWSD0uJ8V68='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)