UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Rebd9sNfulWETJ0/vfjYI7/nCFah7lLZfJ1MX5nohT0=' 
WHERE 
  key_id = '73efe54cabaa72526251db488159507a860eb18bf5d705c5843536b07d469244' 
  AND (
    token = 'Rebd9sNfulWETJ0/vfjYI7/nCFah7lLZfJ1MX5nohT0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00016