UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'nAfDC0Nx+3WaQzF83JrB5HlIMOWT4QK5pk96Fl/se4g=' 
WHERE 
  key_id = '01095c6bb4bbf31a7d64c2f5ae372dd1b53126b1ad2ef4da3a425e0057f60a46' 
  AND (
    token = 'nAfDC0Nx+3WaQzF83JrB5HlIMOWT4QK5pk96Fl/se4g=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00019