UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'eAIuUbxfB/LLJ5W9gnXvD0GyixSmTMfvMhoXvdngUig=' 
WHERE 
  key_id = '1544086c6c86bdfe588747fa30ece2c3fc51e2075411b29fbd18946db4ffdb91' 
  AND (
    token = 'eAIuUbxfB/LLJ5W9gnXvD0GyixSmTMfvMhoXvdngUig=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00040