UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'jekJgvOZyYZ+Suts+9+8SIdKr53qhy+K686I38s4LQE=' 
WHERE 
  key_id = '61732300c8dff7e3bf6e11783e63ff585f08d7d13ba83b8f6144756b436fc398' 
  AND (
    token = 'jekJgvOZyYZ+Suts+9+8SIdKr53qhy+K686I38s4LQE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00042