UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'T4BUMQgk9xL/ILP7HaP/VmLXzUmenetwR6brYk6pFtc=' 
WHERE 
  key_id = '73712e64ff1de6065aff1319817505e50e05de06394ce88ce825d9bd49597e9f' 
  AND (
    token = 'T4BUMQgk9xL/ILP7HaP/VmLXzUmenetwR6brYk6pFtc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00028