UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'wEf3Rsofc1Pb2oIwin3z3ARkyyE/vJ6aaA6zJHM99RY='
WHERE
key_id = 'e4aeb726f4f23b8a69439ab7044930b7dcad3020ff81b2f612b76fce952c6c17'
AND (
token = 'wEf3Rsofc1Pb2oIwin3z3ARkyyE/vJ6aaA6zJHM99RY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)