UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'L1LvEba4GZA2UPa3lqDYBvdK7O5Du+AsIGKa0gZiNVI=' 
WHERE 
  key_id = '7c8cb0f579b69a6e62fbbb73c94f313ae1e0dfbe7f75daf7eb852ef6e3a99ab1' 
  AND (
    token = 'L1LvEba4GZA2UPa3lqDYBvdK7O5Du+AsIGKa0gZiNVI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00015