UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '7k1dFu3Kimh3RV8mF6UqMj1+tJ65KOIr+KG5IMHp+uA='
WHERE
key_id = '75dfa9489d9a02d1f4f9f6f014fba3201970e7dd5748166289d07bf3a8adad68'
AND (
token = '7k1dFu3Kimh3RV8mF6UqMj1+tJ65KOIr+KG5IMHp+uA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)