UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'zeIaeNWu+I4PiA6K1yas5DbBQnMovgACQZNA6tm5my0=' 
WHERE 
  key_id = 'b1c99286434158cc9580ab8c9148bec59f6cb14324d8d1e6baa9227ccbae66b7' 
  AND (
    token = 'zeIaeNWu+I4PiA6K1yas5DbBQnMovgACQZNA6tm5my0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031