UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'eYYUP7ofOSh8LhBSr1HK0ReP6NEiA2XxQowGXMVjlXQ=' 
WHERE 
  key_id = '6af23ac4c1a397293b9326f1c715ff53e864f4a811c060d6bb4837566def2c81' 
  AND (
    token = 'eYYUP7ofOSh8LhBSr1HK0ReP6NEiA2XxQowGXMVjlXQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00025