UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'YE0NZyFW3DTpx9oV6gC0qpu0lf19tdMaLatcQqL/QsA=' 
WHERE 
  key_id = '73963f26050b4cf61ea654eb2b3c4fd2b9ece5af9b39e119ddc792a7b098b280' 
  AND (
    token = 'YE0NZyFW3DTpx9oV6gC0qpu0lf19tdMaLatcQqL/QsA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030