UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'SNCNuquWtvX/YttCoQf6RhD3eD9MVt2Pe11qkWmcCpg=' 
WHERE 
  key_id = '6d55d1d865a72a9d287c64d9508b47f0c68c91968e21e9df688cd780fcbd1f95' 
  AND (
    token = 'SNCNuquWtvX/YttCoQf6RhD3eD9MVt2Pe11qkWmcCpg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034